1. Technical Field
The present invention relates to a memory card which holds an application program.
2. Background Art
With the spread of secure memory cards including smart Secure Digital memory cards (referred to as the “SD cards” hereafter) equipped with Integrated Circuit (IC) card functions, the number of kinds of application programs to be used and the number of their users are expected to increase in the future.
FIG. 1(A) is a diagram showing a hardware construction of a common secure memory card. As shown in FIG. 1(A), a secure memory card 100 is composed of a Read Only Memory (ROM) 103, a Random Access Memory (RAM) 102, a Central Processing Unit (CPU) 104, and a nonvolatile memory group 101. The ROM 103 stores an application program. The RAM 102 temporarily stores data that is to be used when the application program is executed. The CPU 104 executes processes corresponding to various commands in accordance with the application program. The nonvolatile memory group 101 stores an application program that is downloaded from outside of the memory card.
The nonvolatile memory group 101 is made up of: a Ferroelectric RAM (FeRAM) 106 included in a tamper resistant module (TRM: Tamper Resistant Module) 107; a secure flash 108 provided outside of the TRM 107; and a flash memory 109 provided outside of the TRM 107. The secure flash 108 is a flash memory whose security level is raised using the function of the TRM 107.
FIG. 1(B) is a diagram showing the security levels of the three nonvolatile memories making up the nonvolatile memory group 101. As shown in FIG. 1(B), the security level of the FeRAM 106 included in the TRM 107 is the highest, followed by the second highest security level of the secure flash 108, and the security level of the flash memory 109 is the lowest.
An application program downloaded from a service provider is usually stored in the TRM 107 area. Since the capacity of the TRM 107 area is extremely smaller than the capacity of the flash memory 109, the user needs to erase an application program that is too large to be stored in the TRM 107 area.
With this being the situation, there is a need for a system that allows more application programs to be stored in a single secure memory card 100, not by erasing, but by moving the application program stored in the TRM 107 area to the flash memory 109 of the secure memory card 100 while maintaining the security level required by the service provider, and then by restoring the application program to the TRM 107 as needed.
Patent Reference 1 discloses the invention which allocates a storage area to an application program to be downloaded, in accordance with the security level of the application program.    Patent Reference 1: Japanese Laid-Open Patent Application No. 2002-229861
According to the conventional technique disclosed in Patent Reference 1, an application program to be downloaded is stored in either a TRM area or a flash memory when downloaded, depending on the security level of the application program. When the application program is to be stored in the flash memory, this application program which is downloaded in an encrypted form is decrypted first. The decrypted application program is then encrypted using a secret information key previously stored in the TRM area, and the encrypted application program is stored in the flash memory. To be more specific, according to the conventional technique, when the application program is stored in the flash memory whose security level is the lowest in the secure memory card, the application program is encrypted using the secret information key stored in the secure memory card. For this reason, the application program to be downloaded cannot be stored in the flash memory, while maintaining the security level required by the service provider which provides the application program.
An object of the present invention is to provide a memory card which stores an application program downloaded from a service provider in a flash memory, while maintaining a security level required by the service provider.